<?php


namespace frontend\controllers;

use sizeg\jwt\JwtHttpBearerAuth;
use yii\rest\Controller;

class BaseController extends Controller
{
    public function __construct($id, $module, array $config = [])
    {
        parent::__construct($id, $module, $config);
    }

    public function behaviors()
    {
        $behaviors = parent::behaviors();
        $behaviors['authenticator'] = [
            'class' => JwtHttpBearerAuth::class,
            'optional' => [
                'login',
                'register',
                'send-msg',
            ],
        ];

        return $behaviors;
    }


}